package com.jvyou.app.common.domain.model;

import lombok.Getter;
import lombok.Setter;

/**
 * @author 橘柚
 * @since 2025/3/4 17:27
 */
@Getter

public class BasePageInfo {

    private Integer current = 1;

    private Integer pageSize = 10;

    @Setter
    private String sort;

    public void setCurrent(Integer current) {
        if (current == null || current < 1) {
            this.current = 1;
        } else {
            this.current = current;
        }
    }

    public void setPageSize(Integer pageSize) {
        if (pageSize == null || pageSize < 1) {
            this.pageSize = 10;
        } else {
            this.pageSize = pageSize;
        }
    }
}
